﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using ProjectManagement.Domain.Services;
using System.Web.Mvc;

namespace ProjectManagement.Web.HtmlHelp
{
	public static class DisplayProCityHekper
	{
		//view页面返回省
		public static string ReturnPro(this HtmlHelper htmlHelpr,int id)
		{
			if (id!=0)
			{
				ProvienceService _provienceService = new ProvienceService();
				return _provienceService.GetProvienceById(id).Name;
			}
			else
			{
				return "";
			}
		}
		//view页面返回市
		public static string ReturnCity(this HtmlHelper htmlHelper,int id)
		{
			if (id!=0)
			{
				CityService _cityService = new CityService();
				return _cityService.GetCityById(id).Name;
			}
			else
			{
				return "";
			}
		}
	}
}